scale

abstract fun scale(block: DesignBlock, scale: Float, @FloatRange(from = 0.0, to = 1.0) anchorX: Float, @FloatRange(from = 0.0, to = 1.0) anchorY: Float)

Scales the block and all of its children proportionally around the specified relative anchor point. This updates the position, size and style properties (e.g. stroke width) of the block and its children. Required scope: "layer/resize"

Parameters

block

the block that should be scaled.

scale

the scale factor to be applied to the current properties of the block.

anchorX

the relative position along the width of the block around which the scaling should occur. (0F = left edge, 0.5F = center, 1F = right edge)

anchorY

the relative position along the height of the block around which the scaling should occur. (0F = top edge, 0.5F = center, 1F = bottom edge)